package com.five.taotao.guide;


import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import com.five.taotao.R;
import com.five.taotao.guide_mine.MoneyActivity;
import com.five.taotao.guide_mine.MyCollectActivity;
import com.five.taotao.guide_mine.MyNoteActivity;
import com.five.taotao.guide_mine.MyPointActivity;
import com.five.taotao.guide_mine.OrdersActivity;
import com.five.taotao.guide_mine.ShopCarActivity;
import com.five.taotao.login.LoginActivity;
import com.five.taotao.login.RegisterActivity;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

/**
 * A simple {@link Fragment} subclass.
 */
public class MineFragment extends Fragment {


    @BindView(R.id.login)
    TextView login;
    @BindView(R.id.register)
    TextView register;
    @BindView(R.id.shopcar)
    TextView shopcar;
    @BindView(R.id.collect)
    TextView collect;
    @BindView(R.id.money)
    TextView money;
    @BindView(R.id.item1)
    TextView item1;
    @BindView(R.id.pay)
    TextView pay;
    @BindView(R.id.put)
    TextView put;
    @BindView(R.id.send)
    TextView send;
    @BindView(R.id.commit)
    TextView commit;
    @BindView(R.id.back)
    TextView back;
    @BindView(R.id.item2)
    TextView item2;
    @BindView(R.id.item5)
    TextView item5;
    @BindView(R.id.item6)
    TextView item6;
    @BindView(R.id.item7)
    TextView item7;
    @BindView(R.id.item8)
    TextView item8;
    private View v;
    @BindView(R.id.item3)
    TextView item3;
    @BindView(R.id.item4)
    TextView item4;


    public MineFragment() {
        // Required empty public constructor
    }


    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        if (v == null) {
            v = inflater.inflate(R.layout.fragment_mine, container, false);

        }
        ButterKnife.bind(this, v);
        return v;
    }

    @OnClick({R.id.login, R.id.register, R.id.shopcar, R.id.collect, R.id.money})
    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.login:
                Intent intent = new Intent(getActivity(), LoginActivity.class);
                startActivity(intent);
                break;
            case R.id.register:
                Intent intent1 = new Intent(getActivity(), RegisterActivity.class);
                startActivity(intent1);
                break;
            case R.id.shopcar:
                Intent intent2 = new Intent(getActivity(), ShopCarActivity.class);
                startActivity(intent2);
                break;
            case R.id.collect:
                Intent intent3 = new Intent(getActivity(), MyCollectActivity.class);
                startActivity(intent3);
                break;
            case R.id.money:
                Intent intent4 = new Intent(getActivity(), MoneyActivity.class);
                startActivity(intent4);
                break;
        }

    }

    @OnClick({R.id.item3, R.id.item4, R.id.item2, R.id.item5, R.id.item6, R.id.item7, R.id.item8})
    public void onClick1(View view) {
        switch (view.getId()) {
            case R.id.item2:
                break;
            case R.id.item5:
                break;
            case R.id.item6:
                break;
            case R.id.item7:
                break;
            case R.id.item8:
                break;
            case R.id.item3:
                Intent intent = new Intent(getActivity(), MyPointActivity.class);
                startActivity(intent);
                break;
            case R.id.item4:
                Intent intent1 = new Intent(getActivity(), MyNoteActivity.class);
                startActivity(intent1);
                break;

        }
    }


    @OnClick({R.id.item1, R.id.pay, R.id.put, R.id.send, R.id.commit, R.id.back})
    public void onClick2(View view) {
        switch (view.getId()) {
            case R.id.item1:
                Intent intent=new Intent(getActivity(), OrdersActivity.class);
                startActivity(intent);
                break;
            case R.id.pay:
                Intent intent1=new Intent(getActivity(), OrdersActivity.class);
                startActivity(intent1);
                break;
            case R.id.put:
                Intent intent2=new Intent(getActivity(), OrdersActivity.class);
                startActivity(intent2);
                break;
            case R.id.send:
                Intent intent3=new Intent(getActivity(), OrdersActivity.class);
                startActivity(intent3);
                break;
            case R.id.commit:
                Intent intent4=new Intent(getActivity(), OrdersActivity.class);
                startActivity(intent4);
                break;
            case R.id.back:
                Intent intent5=new Intent(getActivity(), OrdersActivity.class);
                startActivity(intent5);
                break;

        }
    }
}
